package com.tree.mybatisdemo.manager.impl;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import com.tree.mybatisdemo.manager.SyncDemoManager;

/**
 * @ClassName SyncDemoManagerImpl
 * @Description: TODO
 * @Author: myl
 * @Create_time:2021/4/28 23:44
 */
@Service
@Async
public class SyncDemoManagerImpl implements SyncDemoManager {
    @Override
    public void print() {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
